package com.sky.mapper;

import com.github.pagehelper.Page;
import com.sky.annotate.AutoFill;
import com.sky.entity.Category;
import com.sky.enumeration.OperationType;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface CategoryMapper {
    Page<Category> pageSelectCategory(Category category);

    List<Category> byTypeSelectCategory(Integer type);

    @AutoFill(OperationType.UPDATE)
    void updateCategory(Category category);

    @AutoFill(OperationType.INSERT)
    void insertCategory(Category category);

    Category selectCategoryById(Long categoryId);

    void deleteCategoryById(Long id);
}
